cmake_minimum_required(VERSION 3.8)
project(path_conversion)
file(RELATIVE_PATH var1 "${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/test/test1/test.txt")
message(STATUS "RELATIVE_PATH - ${var1}")
file(RELATIVE_PATH var2 "/home/xlll/test" "/home/test/test1/test.txt")
message(STATUS "RELATIVE_PATH - ${var2}")
file(TO_CMAKE_PATH "\\home\\xlll\\Downloads" var3)
message(STATUS "TO_CMAKE_PATH - ${var3}")
file(TO_CMAKE_PATH "/home/xlll/Downloads" var4)
message(STATUS "TO_CMAKE_PATH - ${var4}")
file(TO_NATIVE_PATH "/home/xlll/Downloads" var5)
message(STATUS "TO_NATIVE_PATH - ${var5}")

